package cn.beyond.vehicleManagement.service;


import cn.beyond.vehicleManagement.dao.RoleDao;
import cn.beyond.vehicleManagement.pojo.SysDepartment;
import cn.beyond.vehicleManagement.pojo.SysRole;

import java.util.List;
import java.util.Map;

public class RoleService {
   RoleDao dao=new RoleDao();

    /**
     * 添加角色
     * @return
     */
    public int addRole(SysRole sysRole){
        return    dao.addRole(sysRole);
    }

    /**
     * 删除角色
     * @param obj
     * @param column
     * @return
     */
    public int deleteRole(Object obj,String column){
        return dao.deleteRole(obj,column);
    }

    /**
     * 修改角色
     * @return
     */
    public int update(SysRole sysRole){
        return  dao.update(sysRole);
    }

    /**
     * 查询结果返回单条记录
     * @param selectmap
     * @return
     */
    public SysRole selectRoleByOne(SysRole sysRole, Map<String, Object> selectmap){
        return dao.selectUserByOne(sysRole,selectmap);
    }

    /**
     * 查询结果返回多条记录

     * @param selectmap
     * @return
     */
    public List<SysRole> selectUserByCondition(SysRole sysRole,
                                                     Map<String, Object> selectmap){
        return  dao.selectUserByCondition(sysRole,selectmap);
    }

}
